package com.zbycorp.generatecode.utils;

import com.intellij.database.psi.DbTable;
import com.intellij.psi.PsiClass;
import lombok.Data;

import java.util.List;

/**
 * @author YCL
 * @date 2023/3/24
 */
@Data
public class CacheDataUtil {

    private volatile static CacheDataUtil cacheDataUtil;

    public static CacheDataUtil getInstance() {
        if (cacheDataUtil == null) {
            synchronized (CacheDataUtil.class) {
                if (cacheDataUtil == null) {
                    cacheDataUtil = new CacheDataUtil();
                }
            }
        }
        return cacheDataUtil;
    }

    /**
     * 当前选中的表
     */
    private DbTable selectDbTable;
    /**
     * 所有选中的表
     */
    private List<DbTable> dbTableList;
    /**
     * 选中的类
     */
    private PsiClass selectPsiClass;
    /**
     * 所有选中的表
     */
    private List<PsiClass> psiClassList;

}
